use Test::More;
use_ok('Finance::QuoteHist::cnYES');

# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.

my $q = new Finance::QuoteHist::cnYES
(
 symbols    => [qw(2330)],
 start_date => '2009/10/01',
 end_date   => '2009/10/01',
 );

# Values
foreach $row ($q->quotes()) {
  my ($symbol, $date, $open, $high, $low, $close, $volume) = @$row;
  ok($symbol == '2330', 'symbol');
  ok($date eq '2009/10/01', 'date');
  ok($open == 65.00, 'open');
  ok($high == 65.20, 'high');
  ok($low == 63.80, 'low');
  ok($close == 65.00, 'close');
  ok($volume == 55067, 'volume');
}

done_testing();
